package com.itheima.advice;


import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.stereotype.Component;

@Component  //交由spring容器
@Aspect  //声明是切面类
@EnableAspectJAutoProxy  //开启aop注解的支持
public class AOPAdvice {

    @Pointcut("execution(* *..*(..))")
    public  void  pt(){}

    @Before("pt()")
    public void before(){
        System.out.println("before...................");
    }
}
